package com.example.shop_2207.database

import androidx.lifecycle.MutableLiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.example.shop_2207.entity.UserEntity
@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertUser(user:UserEntity)
    @Update
    fun updateUser(user: UserEntity)
    @Delete
    fun deleteUser(user: UserEntity)
    @Query("select * from user where id =:id")
    fun queryUserById(id:Int):UserEntity
}